#version 330 core
in vec2 pos;
out vec4 FragColor;

uniform vec4 plantColor;
uniform vec4 lineColor;

bool IsDrawLine(float i)
{
	float f = floor(i);
	i = abs(i - f);
	if (i < 0.02)
		return true;
	return false;
}

void main()
{
	if (IsDrawLine(pos.x) || IsDrawLine(pos.y))
		FragColor = lineColor;
	else
		FragColor = plantColor;
}
